/* eslint arrow-body-style: ["error", "always"] */

const endPoints = {
  resetPassword: {
    url: 'api/v1/authserver/accounts/sendPasswordResetCode',
  },
  register: {
    url: 'api/v1/authserver/accounts/register',
  },
  validityCheck: {
    url: '/api/v1/authserver/customProfile',
  },
  profileUpdate: {
    url: '/api/v1/authserver/customProfile',
  },
  uiSettings: {
    url: '/api/v1/authserver/customProfile/uiSettings',
  },
  availabilityUpdate: {
    url: '/api/v1/authserver/customProfile/availability',
  },
  autoOffline: {
    url: '/api/v1/authserver/customProfile/autoOffline',
  },
  logout: {
    url: 'api/v1/authserver/accounts/signOut',
  },

  fetchFacebookPages: {
    url (accountId) {
      return `api/v1/accounts/${accountId}/callbacks/facebook_pages.json`
    },
    params: { omniauth_token: '' },
  },

  deleteAvatar: {
    url: '/api/v1/authserver/customProfile/avatar',
  },

  setActiveAccount: {
    url: '/api/v1/authserver/customProfile/setActiveAccount',
  },
}

export default page => {
  return endPoints[page]
}
